interface ImportMetaEnv {
  readonly VITE_APP_ENV: string
  readonly VITE_APP_BASE_API: string
  readonly VITE_APP_TITLE: string
}

interface ImportMeta {
  readonly env: ImportMetaEnv
}

export const getEnvConfig = () => {
  const env = import.meta.env
  return {
    APP_ENV: env.VITE_APP_ENV,
    BASE_API: env.VITE_APP_BASE_API,
    APP_TITLE: env.VITE_APP_TITLE,
  }
}

export const isDev = () => getEnvConfig().APP_ENV === 'development'
export const isProd = () => getEnvConfig().APP_ENV === 'production'
export const isStaging = () => getEnvConfig().APP_ENV === 'staging' 